package com.googlecode.openauth.entity;

import java.util.UUID;

import org.apache.commons.lang.StringUtils;

public class AreaInfo {
private int areaId;
private String areaName;
private String uuid;
private String areaDesc;
private int levelId;
private String levelName;
private String levelDesc;
private int parentId;
private String parentAreas;
public AreaInfo() {
	super();
	uuid = UUID.randomUUID().toString();
}

public String getParentAreas() {
	return parentAreas;
}
public void setParentAreas(String parentAreas) {
	this.parentAreas = parentAreas;
}
public int getParentId() {
	return parentId;
}
public void setParentId(int parentId) {
	this.parentId = parentId;
}
public String getAreaName() {
	return areaName;
}
public void setAreaName(String areaName) {
	this.areaName = areaName;
}
public int getAreaId() {
	return areaId;
}
public void setAreaId(int areaId) {
	this.areaId = areaId;
}
public String getUuid() {
	return uuid;
}
public void setUuid(String uuid) {
	this.uuid = uuid;
}
public String getAreaDesc() {
	return areaDesc;
}
public void setAreaDesc(String areaDesc) {
	this.areaDesc = areaDesc;
}
public int getLevelId() {
	return levelId;
}
public void setLevelId(int levelId) {
	this.levelId = levelId;
}
public String getLevelName() {
	return levelName;
}
public void setLevelName(String levelName) {
	this.levelName = levelName;
}
public String getLevelDesc() {
	return levelDesc;
}
public void setLevelDesc(String levelDesc) {
	this.levelDesc = levelDesc;
}

public String toString() {
	StringBuilder builder = new StringBuilder();

	builder.append(" areaId : ");
	builder.append(areaId);
	
	if(!StringUtils.isEmpty(uuid)){
		builder.append(" uuid :  ");
		builder.append(uuid);
	}
	
	if(!StringUtils.isEmpty(areaName)){
		builder.append(" areaName :  ");
		builder.append(areaName);
	}
	
	if(!StringUtils.isEmpty(areaDesc)){
		builder.append(" areaDesc : ");
		builder.append(areaDesc);
	}
	
	builder.append(" levelId : ");
	builder.append(levelId);
	
	if(!StringUtils.isEmpty(levelName)){
		builder.append(" levelName : ");
		builder.append(levelName);
	}
	
	if(!StringUtils.isEmpty(levelDesc)){
		builder.append(" levelDesc : ");
		builder.append(levelDesc);
	}
	
	builder.append(" parentId : ");
	builder.append(parentId);
	
	if(!StringUtils.isEmpty(parentAreas)){
		builder.append(" parentAreas : ");
		builder.append(parentAreas);
	}
	return builder.toString();
}

}
